#!/bin/sh

. /usr/share/common

DAEMON_ARGS="-r -c /etc/iad.json"

start() {
	echo_title "Starting Ingenic Audio Daemon"

	start_daemon
}

stop() {
	echo_title "Stopping Ingenic Audio Daemon"

	stop_daemon
}

restart() {
	stop || true
	sleep 1
	start
}

case "$1" in
	start)
		start
		;;
	stop)
		stop
		;;
	restart)
		restart
		;;
	*)
		echo "Usage: $0 {start|stop|restart}"
		exit 1
esac

exit 0
